with PortAudioAda.Win_WaveFormat;

package PortAudioAda.Win_DS is

   paWinDirectSoundUseLowLevelLatencyParameters
     : constant IC.unsigned_long := 16#01#;
   paWinDirectSoundUseChannelMask
     : constant IC.unsigned_long := 16#04#;

   type PaWinDirectSoundStreamInfo is
      record
         --  PaWinDirectSoundStreamInfo'Size / 8
         size                : aliased IC.unsigned_long;
         hostApiType         : aliased PaHostApiTypeId;    -- paDirectSound
         version             : aliased IC.unsigned_long;   -- 1

         flags               : aliased IC.unsigned_long;

         --  low-level latency setting support
         --    Control the size of host buffers in order to set latency. They
         --    will be used instead of the generic parameters to Pa_OpenStream
         --    if  flags contains the
         --    paWinDirectSoundUseLowLevelLatencyParameters flag.
         --
         --    If PaWinDirectSoundStreamInfo structures with
         --    paWinDirectSoundUseLowLevelLatencyParameters are supplied for
         --    both input and output in a full duplex stream, then the input
         --    and output framesPerBuffer must be the same, or the larger of
         --    the two must be a multiple of the smaller, otherwise a
         --    paIncompatibleHostApiSpecificStreamInfo error will be returned
         --    from Pa_OpenStream.
         --
         --  framesPerBuffer : IC.unsigned_long;
         --     --  NOT IMPLEMENTED see http://www.portaudio.com/trac/ticket/129

         --  support for WAVEFORMATEXTENSIBLE channel masks. If flags contains
         --  paWinDirectSoundUseChannelMask this allows you to specify which
         --  speakers to address in a multichannel stream. Constants
         --  for channelMask are specified in pa_win_waveformat.h
         channelMask         : aliased
           PortAudioAda.Win_WaveFormat.PaWinWaveFormatChannelMask;

      end record;
   pragma Convention (C, PaWinDirectSoundStreamInfo);

end PortAudioAda.Win_DS;
